import http from '../http'
export default {
    //获取用户自己的信息
    detail(params,callback){
        http.get('/user/detail',{params},callback);
    },
    //获取他人的信息
    taDetail(id,params,callback){
        http.get(`/user/detail/${id}`,{params},callback);
    },
    //检查会员有没有完善个人信息
    checkUserInfo(url,params,callback){
        http.get('/user/checkUserInfo',params,callback);
    },
    //修改用户信息
    updateUser(params,callback){
        http.put('/user/data',params,callback);
    },
    getHobby(groupCode,params,callback){           //兴趣爱好标签字典表接口
        http.get(`/dict/listByGroupCode?groupCode=${groupCode}`,params,callback);
    },
    //获取钻石购买列表
    getsysDiamondInstallList(params,callback){
        http.get('/wallet/info/rechargeList',{params},callback);
    },
    //获取ios钻石购买列表
    rechargeListIOS(params,callback){
        http.get('/wallet/info/rechargeList',{params},callback);
    },
    //关注列表
    listByUser(params,callback){
        http.get('/followUser/listByUser',{params},callback);
    },
     //我的粉丝
     listByObjectUser(params,callback){
        http.get('/followUser/listByObjectUser',{params},callback);
    },
    //我收到的礼物
    getGiftUserByToUserId(params,callback){
        http.get('/gift/sysGiftUser/app/getGiftUserByToUserId',{params},callback);
    },
    //我送出的礼物
    getGiftUserByFormUserId(params,callback){
        http.get('/gift/sysGiftUser/app/getGiftUserByFormUserId',{params},callback);
    },
    //我的钻石交易日志记录
    getUserDiamondlog(params,callback){
        http.get('/diamond/userDiamondLog/app/getUserDiamondlog',{params},callback);
    },
    //礼物展示列表
    getAllGiftList(params,callback) {
        http.get('/gift/app/getAllGiftList', {params}, callback)
    },

    //优惠券列表
    listByUserAndGroupCode(params,callback) {
        http.get('/couponUser/listByUserAndGroupCode', {params}, callback)
    },
    //我的服务->已认证
    myService(userId,params,callback) {
        http.get(`/userServiceInfo/data/myService?userId=${userId}`, params, callback)
    },
    //我的服务->未认证
    UnauthorizedService(params,callback) {
        http.get('/userServiceInfo/data/UnauthorizedService', {params}, callback)
    },
    // //我的点赞->总数量
    // countByObjectId(params,callback) {
    //     http.get('/vote/countByObjectId', {params}, callback)
    // },
    // //我的点赞->列表
    // likeUser(params,callback) {
    //     http.get('/vote/user', {params}, callback)
    // },
    //图片上传
    uploadImg(params,callback) {
        http.post('/file/upload',params,callback)
    },
    //获取别的用户的相册信息
    getUserImgta(userId,params,callback) {
        http.get(`/userPhoto/search/user?userId=${userId}`,params,callback)
    },
    //获取用户自己的相册信息
    getUserImgme(params,callback) {
        http.get('/userPhoto/search/user',params,callback)
    },
    //删除用户相册信息
    deleteUserImg(id,params,callback) {
        http.patch(`/userPhoto/delete/${id}`,params,callback)
    },
    //保存用户相册信息
    addUserImg(fileId,params,callback) {
        http.post(`/userPhoto/data?fileId=${fileId}`,params,callback)
    },
    //设置封面
    setUserImg(id,params,callback) {
        http.patch(`/userPhoto/data/${id}/index`,params,callback)
    },
    //  提现操作接口
    fetchOut(params,callback){
        http.post('/wallet/fetch/out',params,callback)
    },
    //  提现资料补全接口
    fetchData(params,callback){
        http.put('/wallet/fetch/data',params,callback)
    },
    //  提现扣费接口
    fetchCost(money,type,params,callback){
        http.get(`/wallet/rate/fetchCost?money=${money}&type=${type}`,params,callback)
    },
    //查询会员账户余额
    getYueDetail(type,params,callback){
        http.get(`/wallet/fetch/detail?type=${type}`,{params},callback)
     },
    //我的主页榜单查询
    getUserCredit(params,callback){
        http.get('/credit/userCredit/app/getUserCredit',{params}, callback)
    },
    //我的服务下架
    updateOnlineStatus(params,callback){
        http.patch('/serviceAuth/data/updateOnlineStatus',params, callback)
    },
    //身份认证
    addUserIdentityAuth(params,callback){
        http.post('/userIdentityAuth/addUserIdentityAuth',params, callback)
    },
    //服务认证文案+示例
    getServiceInfo(params,callback){
        http.get('/service/data/getServiceInfo',{params}, callback)
    },
    //服务认证添加
    addServiceFw(secondAttributeIds,params,callback){
        http.post(`/serviceAuth/add?secondAttributeIds=${secondAttributeIds}`,params, callback)
    },
    //是否关注过
    isAttention(objectId,params,callback){
        http.get(`/followUser/exists/${objectId}`,{params}, callback)
    },
    //添加用户关注
    addAttention(params,callback){
        http.post('/followUser/data/',params, callback)
    },
    //删除用户关注
    dropAttention(objectId,params,callback){
        http.delete(`/followUser/data/object/${objectId}`,{params}, callback)
    },
    //人物一键上线或下线
    updateDataOnlineStatus(params,callback){
        http.patch(`/user/data/updateOnlineStatus`,params, callback)
    },   
    //会员其他金额购买钻石计算查询
    getOtherMoneyDiamond(url,params,callback){
        /*http.get('/diamond/diamondInstall/app/getOtherMoneyDiamond'+url,{params},callback)*/
        http.get('/wallet/rate/rmb2credits'+url,{params},callback)
    },
    //查询会员账户余额
    getUserWalletDetail(params,callback){
        http.get('/wallet/info/detail',{params},callback)
     },
    //会员购买钻石支付接口
    creditsPay(params,callback){
        http.post('/order/directPay/creditsPay',params,callback)
    },
    //  下单抵扣
    credits2rmb(params,callback){
        http.get('/wallet/rate/credits2rmb',{params},callback)
    },
    //  礼物钻石支付
    giftPay(params,callback){
        http.post('/order/directPay/giftPay',params,callback)
    },
    //  钱包充值
    rechargePay(params,callback){
        http.post('/order/directPay/rechargePay',params,callback)
    },
    //  现金交易记录分页查询
    cash(params,callback){
        http.get('/wallet/info/log/cash',{params},callback)
    },
    //  我的收入
    income(params,callback){
        http.get('/wallet/info/income',{params},callback)
    },
    //  我的收入列表
    incomeList(params,callback){
        http.get('/wallet/info/log/income',{params},callback)
    },
    //  充值列表
    rechargeList(params,callback){
        http.get('/wallet/info/rechargeList',{params},callback)
    },
    //  更换绑定手机
    updatePhone(phone,code,params,callback){
        http.patch(`/user/data/phone?phone=${phone}&code=${code}`,params,callback)
    },
    //  关注搜索
    searchFollowObject(params,callback){
        http.get(`/followUser/searchFollowObject`,{params},callback)
    },
    //  粉丝搜索
    searchFollow(params,callback){
        http.get(`/followUser/searchFollow`,{params},callback)
    },
    //  我的收入详细列表
    incomeList(params,callback){
        http.get(`/wallet/info/log/income`,{params},callback)
    },
    //  获取聊天的历史记录
    listByChat(params,callback){
        http.get(`/message/listByChat`,{params},callback)
    },
    //  存储信息到本地服务器
    messageSend(params,callback){
        http.post(`/message/send`,params,callback)
    },
    //  退出登录
    logout(params,callback){
        http.get(`/authority/logout`,params,callback)
    }
}